package com.ac.app.web.action.org;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.ac.app.dm.OrgLink;
import com.ac.app.web.form.OrgLinkForm;
import com.caac.core.web.action.BaseAction;
import com.caac.core.web.form.BaseForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

public class GetOrgLinkAction extends BaseAction {
	protected ActionForward doExecute(ActionMapping mapping, BaseForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		String id = request.getParameter("id");
		OrgLinkForm myForm = (OrgLinkForm) form;
		myForm.setDm(null);
		OrgLink dm = new OrgLink();
		dm.setOrgId(id);
		myForm.setDm(dm);
        List list=this.getBaseManager().getObjects(OrgLink.class, "ORG_ID='"+id+"' order by INPUT_TIME desc");
        request.setAttribute("list", list);
		return forward(mapping);
	}
}
